package com.tanxi521.springboot.pojo;

import lombok.Data;

/**
 * @Author: i-xiaotian
 * @Date: 2022/4/9 22:23
 * @EMAIL: 1254806967@qq.com
 */
@Data
public class Page {

    private Integer start;

    private Integer pageSize;

    public Page(Integer pageIndex, Integer pageSize) {
        if (pageIndex == 1) {
            this.start = 0;
        } else {
            this.start = (pageIndex - 1) * pageSize;
        }
        this.pageSize = pageSize;
    }

}
